package com.atnjupt.mybatis.mappers;

import com.atnjupt.mybatis.bean.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Wizarder
 * @create 2022-04-12 17:14
 */
public interface SQLMapper {
    /**
     * 根据用户名模糊查询
     * @param username
     * @return
     */
    List<User> getUserByLike(@Param("username") String username);

    /**
     * 批量删除
     * @param id
     * @return
     */
    int deleteMore(@Param("id")String id);

    /**
     * 根据不同表的名字查询
     * @param tableName
     * @return
     */
    List<User> getUserByTableName(@Param("tableName") String tableName);

    /**
     * 获取主键自增id
     * @param user
     */
    void insertUser(User user);
}
